<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<tpl> $NCharset </tpl>" />
<link href="<tpl> $template_dir </tpl>/member/css/layout.css" rel="stylesheet" type="text/css" />
<tpl> include file ='../head.config.html' </tpl>
<link id="calCss" type="text/css" href="../js/calendar/blue/blue.css" rel="Stylesheet" />
<script type="text/javascript" src="../js/calendar/Calendar.js"></script>
</head>
<body><tpl>include file ='../header.html'</tpl>
<div id="container761">
  <div class="own_member_main">
 <tpl>include file ='own_menu.html'</tpl>
  <div class="member_right">
<div class="new_main_left">
		<div class="new_main_left1">
	<h1 class="new_text"><tpl> $langPredepositPay </tpl></h1>
 <i></i>
	</div>
	<b></b>
	</div>
	<div id="own_main_rightop">
		<tpl> $langPrePayRemark </tpl>
	</div>
	<div id="own_main_rightop_line" style="margin-top:-3px;">
	  <b class="b4"></b>
	  <b class="b3"></b>
	  <b class="b2"></b>
	  <b class="b1"></b>
	  </div>
	  <form action="own_predeposit.php?action=pay_save" method="post" name="form_pay" id="form_pay">
      <table border="1" cellpadding="0" cellspacing="0" bordercolor="#DEEBEF" style="overflow:visible; margin-top:10px" class="table_style2">
	
		<tr class="tr_dotted">
          <td height="30" colspan="8" align="right" style="padding-right:5px"><tpl> $langPrePay </tpl> 
            | <a href="own_predeposit.php?action=cash_set"><tpl> $langPreCash </tpl></a> | <a href="own_predeposit.php?action=list"><tpl> $langPreDetailView </tpl></a> | <a href="own_predeposit.php?action=record_list"><tpl> $langPreRecordView </tpl></a> | <a href="own_predeposit.php?action=cash_list"><tpl> $langPreCashView </tpl></a></td>
        </tr>
	 	<tr class="tr_dotted">
          <td height="30" valign="middle" bgcolor="#F5F9FA" ><label for="pay_type_online"><input type="radio" id="pay_type_online" name="pay_type" checked="checked" value="online" onclick="$('#tr_online').css('display','');$('#tr_online_amount').css('display','');$('#tr_offline').css('display','none');" /><tpl> $langPrePayOnline </tpl></label></td>
        </tr>
		<tr class="tr_dotted" id="tr_online"><!-- 账户 -->
          <td height="25" align="left" valign="middle" bgcolor="#FCFEFE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  	<tpl> foreach from=$offline_array.online item=one key=key </tpl>
				<tpl> if $key eq 'alipay' || $key eq 'tenpay' </tpl>
				<input type="radio" <tpl> if $key eq 'alipay' </tpl>checked="checked"<tpl> /if </tpl> name="online_type" value="<tpl> $key </tpl>" />
				<tpl> if $key eq 'alipay' </tpl><tpl> $langPreCashTypeAlipay </tpl><tpl> /if </tpl>
				<tpl> if $key eq 'tenpay' </tpl><tpl> $langPreCashTypeTenpay </tpl><tpl> /if </tpl>
				<tpl> /if </tpl>
			<tpl> /foreach </tpl>
		  </td>
        </tr>
		<tr class="tr_dotted" id="tr_online_amount"><!-- 金额 -->
          <td height="25" align="left" valign="middle" bgcolor="#FCFEFE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  	<tpl> $langPrePayAmount </tpl>：<input type="text" name="online_amount"class="new_input" id="online_amount" value="" />
			<label style="display:none" for="online_amount" class="wrong" metaDone="true" generated="true"></label>
		  </td>
        </tr>
		<tr class="tr_dotted">
          <td height="25" align="left" valign="middle" bgcolor="#F5F9FA"><label for="pay_type_offline"><input type="radio" name="pay_type" id="pay_type_offline" value="offline" onclick="$('#tr_offline').css('display','');$('#tr_online_amount').css('display','none');$('#tr_online').css('display','none');" /><tpl> $langPreCashTypeOffline </tpl></label></td>
        </tr>
		<tr class="tr_dotted" style="display:none" id="tr_offline">
          <td height="25" valign="middle">
			<table width="100%" bgcolor="#FCFEFE" class="table_style_nopadding">
				<tpl> section name=loop loop=$offline_pay </tpl>
					<tr class="tr_dotted">
						<td height="30" align="right" valign="middle">
							<input type="radio" name="offline_pay_id" <tpl> if $smarty.section.loop.rownum eq '1' </tpl>checked="checked"<tpl> /if </tpl> value="<tpl> $offline_pay[loop].pay_id </tpl>" />
						</td>
						<td height="30" valign="middle">
							<tpl> if $offline_pay[loop].pay_ico neq '' </tpl>
							<img src="<tpl> $offline_pay[loop].pay_ico </tpl>" width="60px;" height="40px;" />&nbsp;&nbsp;
							<tpl> /if </tpl>
							<tpl> $langPreReceptPayName </tpl>：<tpl> $offline_pay[loop].pay_name </tpl>&nbsp;&nbsp;
							<input type="hidden" name="pay_name_<tpl> $offline_pay[loop].pay_id </tpl>" id="pay_name_<tpl> $offline_pay[loop].pay_id </tpl>" value="<tpl> $offline_pay[loop].pay_name </tpl>" />
							<tpl> $langPreReceptPayAccount </tpl>：<tpl> $offline_pay[loop].pay_account </tpl>&nbsp;&nbsp;
							<input type="hidden" name="pay_account_<tpl> $offline_pay[loop].pay_id </tpl>" id="pay_account_<tpl> $offline_pay[loop].pay_id </tpl>" value="<tpl> $offline_pay[loop].pay_account </tpl>" />
							<tpl> $langPreReceptPayConsignee </tpl>：<tpl> $offline_pay[loop].pay_consignee </tpl>&nbsp;&nbsp;
							<input type="hidden" name="pay_consignee_<tpl> $offline_pay[loop].pay_id </tpl>" id="pay_consignee_<tpl> $offline_pay[loop].pay_id </tpl>" value="<tpl> $offline_pay[loop].pay_consignee </tpl>" />
						</td>
					</tr>
				<tpl> /section </tpl>
				<tr class="tr_dotted">
					<td height="235" colspan="2" valign="middle">
						<table width="100%">
							<tr class="tr_dotted">
							  <td width="15%" height="25" align="right" valign="middle"><tpl> $langPreSenderName </tpl>：</td>
							  <td width="85%" height="25" align="left" valign="middle"><input type="text" name="txt_sender_name"class="new_input" id="txt_sender_name" /><label style="display:none" for="txt_sender_name" class="error" metaDone="true" generated="true"></label></td>
							</tr>
							<tr class="tr_dotted">
							  <td height="25" align="right" valign="middle"><tpl> $langPreSenderBank </tpl>：</td>
								<td height="25" align="left" valign="middle"><input type="text" name="txt_sender_bank"class="new_input" id="txt_sender_bank" /><label style="display:none" for="txt_sender_bank" class="wrong" metaDone="true" generated="true"></label></td>
							</tr>
							<tr class="tr_dotted">
							  <td height="25" align="right" valign="middle"><tpl> $langPreSenderAmount </tpl>：</td>
								<td height="25" align="left" valign="middle"><input type="text" name="txt_sender_amount" class="new_input"id="txt_sender_amount" /><label style="display:none" for="txt_sender_amount" class="wrong" metaDone="true" generated="true"></label></td>
							</tr>
							<tr class="tr_dotted">
							  <td height="25" align="right" valign="middle"><tpl> $langPreSenderDate </tpl>：</td>
								<td height="25" align="left" valign="middle"><input type="text" name="txt_sender_date" id="txt_sender_date" style="border:solid 1px #B0DF82;cursor:pointer; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px;" readonly="readonly" />
							  <label style="display:none" for="txt_sender_date" class="wrong" metaDone="true" generated="true"></label></td>
							</tr>
							<tr class="tr_dotted">
							  <td height="25" align="right" valign="middle"><tpl> $langPreMemberRemark </tpl>：</td>
								<td height="25" align="left" valign="middle"><textarea style="height:100px;" name="txt_sender_remark" id="txt_sender_remark" cols="50" rows="5"></textarea></td>
							</tr>
					  </table>
				  </td>
				</tr>
			</table>
		  </td>
        </tr>
		<tr class="tr_dotted">
          <td height="30" align="center" valign="middle">
		  	<input type="submit" value="<tpl> $langPrePay </tpl>" class="new_anniu"/>
			<input type="button" value="<tpl> $langPreReturn </tpl>" onclick="location.href='own_predeposit.php?action=list'" class="new_anniu"/></td>
        </tr>
      </table>
	  </form>
		 <div style="clear:both"></div>
  </div>
   <div style="clear:both"></div>
  </div> <tpl> include file ='../../../html/footer.html' </tpl>
  </div>
</body>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
	//对添加表单做的验证定义
	$('#form_pay').validate({
		errorClass: "wrong",
		rules: {
			txt_sender_name: {required:"#pay_type_offline:checked"},
			txt_sender_bank: {required:"#pay_type_offline:checked"},
			txt_sender_amount: {required:"#pay_type_offline:checked",number:"#pay_type_offline:checked"},
			txt_sender_date: {required:"#pay_type_offline:checked"},
			online_amount: {required:"#pay_type_online:checked",number:"#pay_type_online:checked"}
		},
		messages: {
			txt_sender_name: {required: "<tpl> $langPreSenderNameIsEmpty </tpl>"},
			txt_sender_bank: {required: "<tpl> $langPreSenderBankIsEmpty </tpl>"},
			txt_sender_amount: {required:"<tpl> $langPreSenderAmountIsEmpty </tpl>",number:"<tpl> $langPrePayAmountIsNotVoid </tpl>"},
			txt_sender_date: {required:"<tpl> $langPreSenderDateIsEmpty </tpl>"},
			online_amount: {required:"<tpl> $langPrePayAmountIsNotVoid </tpl>",number:"<tpl> $langPrePayAmountIsNotVoid </tpl>"}
		}
	});
});
$(function(){
   $("#txt_sender_date").datepicker();
})
</script>
</html>